<?php

namespace app\uni\controller;


use think\Controller;

class Notice extends Controller
{
    public function _initialize()
    {
        $this->NoticeModel = model('Notice.Notice');
    }

    // 获取公告列表
    public function noticelist(){
      $list=$this->NoticeModel->where('is_publish',1)->order('is_top desc,issue_time desc')->select();

      $this->success('','',$list);
    }

    // 公告详情
    public function noticeinfo(){
      $notice_id = $this->request->param('noticeid', '', 'trim');

      $data=$this->NoticeModel->where('id',$notice_id)->find();

      $this->success('','',$data);
    }
    
}
